#pragma once
#include "hardware_buffer.h"
#include "refc_ptr.h"
#include "vertex.h"

namespace krryn{
namespace system{ template<typename _RenderTag> class renderer; }
namespace scene{
	template
	<
		typename _RenderTag,
		typename _Vertex = scene::vertex
	>
	class vertex_buffer : public hardware_buffer{
	public:
		typedef krryn::core::refc_ptr<vertex_buffer> ptr;

		vertex_buffer(system::renderer<_RenderTag> &a_Renderer, size_t a_Size) {}
		~vertex_buffer() {}

		virtual void lock(lock_type a_Type);
		virtual void unlock();

		void draw();
		void draw_indexed(const index_buffer<_RenderTag> &a_Buffer);

		void operator +=(_Vertex &a_Vertex);
	};
}
}